package com.tl.bootmeter.pojo;

import com.alibaba.fastjson.annotation.JSONField;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

public class MeterMode implements Serializable {
    //仪表ID
    private int meter_id;
    //仪表编号
    private String meter_sn;
    //信号强度		取值范围[0,31]。值越大表示现场的无线信号越好。
    private String meter_signal;
    //电池状态		0-正常；1-报警
    private int meter_batteryState;
    //电池电压		单位V，2位小数
    private double meter_voltage;
    //间隔		单位：分钟。
    private int meter_interval;
    //温度高报		单位℃，2位小数
    private double meter_titHi;
    //温度低报		单位℃，2位小数
    private double meter_titLo;
    //压力高报		单位Mpa，2位小数
    private double meter_pitHi;
    //压力低报		单位Mpa，2位小数
    private double meter_pitLo;
    /*
     * 报警使能是否开启
     * Bit0 温度高值报警使能（1-有效0-无效下同）
     * Bit1 温度低值报警使能
     * Bit2 压力高值报警使能
     * Bit3 压力低值报警使能
     */
    //温度高值报警（1-有效，0-无效）
    private int meter_titHiEnabled;
    //温度低值报警（1-有效，0-无效）
    private int meter_titLoEnabled;
    //压力高值报警（1-有效，0-无效）
    private int meter_pitHiEnabled;
    //压力低值报警（1-有效，0-无效）
    private int meter_pitLoEnabled;
    //时间戳		年、月、日、时、分、秒
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private Date meter_timeStamp;
    /*
     * 仪表类型
     * 0x01无线压力变送器
     * 0x02无线温度变送器
     * 0x03无线温度压力一体化变送器
     */
    private int meter_type;
    /*
     * 仪表运行状态
     * Bit0 温度传感器状态（0-已接入；1-未接入）
     * Bit1 温度低限报警（0-正常；1-报警）
     * Bit2 温度高限报警（0-正常；1-报警）
     * Bit3 压力传感器状态（0-已接入；1-未接入）
     * Bit4 压力低限报警（0-正常；1-报警）
     * Bit5 压力高限报警（0-正常；1-报警）
     * Bit6 在线状态（0-离线；1-在线）
     */
    //温度传感器状态（0-已接入；1-未接入）
    private int meter_titState;
    //温度低限报警（0-正常；1-报警）
    private int meter_titLoStateAlmenab;
    //温度高限报警（0-正常；1-报警）
    private int meter_titHiStateAlmenab;
    //压力传感器状态（0-已接入；1-未接入）
    private int meter_pitState;
    //压力低限报警（0-正常；1-报警）
    private int meter_pitLoStateAlmenab;
    // 压力高限报警（0-正常；1-报警）
    private int meter_pitHiStateAlmenab;
    //在线状态（0-离线；1-在线）
    private int meter_state;
    //温度数据
    private double meter_tit;
    //压力数据
    private double meter_pit;
    public int getMeter_id() {
        return meter_id;
    }
    public void setMeter_id(int meter_id) {
        this.meter_id = meter_id;
    }
    public String getMeter_sn() {
        return meter_sn;
    }
    public void setMeter_sn(String meter_sn) {
        this.meter_sn = meter_sn;
    }
    public String getMeter_signal() {
        return meter_signal;
    }
    public void setMeter_signal(String meter_signal) {
        this.meter_signal = meter_signal;
    }
    public int getMeter_batteryState() {
        return meter_batteryState;
    }
    public void setMeter_batteryState(int meter_batteryState) {
        this.meter_batteryState = meter_batteryState;
    }
    public double getMeter_voltage() {
        return meter_voltage;
    }
    public void setMeter_voltage(double meter_voltage) {
        this.meter_voltage = meter_voltage;
    }
    public int getMeter_interval() {
        return meter_interval;
    }
    public void setMeter_interval(int meter_interval) {
        this.meter_interval = meter_interval;
    }
    public double getMeter_titHi() {
        return meter_titHi;
    }
    public void setMeter_titHi(double meter_titHi) {
        this.meter_titHi = meter_titHi;
    }
    public double getMeter_titLo() {
        return meter_titLo;
    }
    public void setMeter_titLo(double meter_titLo) {
        this.meter_titLo = meter_titLo;
    }
    public double getMeter_pitHi() {
        return meter_pitHi;
    }
    public void setMeter_pitHi(double meter_pitHi) {
        this.meter_pitHi = meter_pitHi;
    }
    public double getMeter_pitLo() {
        return meter_pitLo;
    }
    public void setMeter_pitLo(double meter_pitLo) {
        this.meter_pitLo = meter_pitLo;
    }
    public int getMeter_titHiEnabled() {
        return meter_titHiEnabled;
    }
    public void setMeter_titHiEnabled(int meter_titHiEnabled) {
        this.meter_titHiEnabled = meter_titHiEnabled;
    }
    public int getMeter_titLoEnabled() {
        return meter_titLoEnabled;
    }
    public void setMeter_titLoEnabled(int meter_titLoEnabled) {
        this.meter_titLoEnabled = meter_titLoEnabled;
    }
    public int getMeter_pitHiEnabled() {
        return meter_pitHiEnabled;
    }
    public void setMeter_pitHiEnabled(int meter_pitHiEnabled) {
        this.meter_pitHiEnabled = meter_pitHiEnabled;
    }
    public int getMeter_pitLoEnabled() {
        return meter_pitLoEnabled;
    }
    public void setMeter_pitLoEnabled(int meter_pitLoEnabled) {
        this.meter_pitLoEnabled = meter_pitLoEnabled;
    }
    public Date getMeter_timeStamp() {
        return meter_timeStamp;
    }
    public void setMeter_timeStamp(Date meter_timeStamp) {
        this.meter_timeStamp = meter_timeStamp;
    }
    public int getMeter_type() {
        return meter_type;
    }
    public void setMeter_type(int meter_type) {
        this.meter_type = meter_type;
    }
    public int getMeter_titState() {
        return meter_titState;
    }
    public void setMeter_titState(int meter_titState) {
        this.meter_titState = meter_titState;
    }
    public int getMeter_titLoStateAlmenab() {
        return meter_titLoStateAlmenab;
    }
    public void setMeter_titLoStateAlmenab(int meter_titLoStateAlmenab) {
        this.meter_titLoStateAlmenab = meter_titLoStateAlmenab;
    }
    public int getMeter_titHiStateAlmenab() {
        return meter_titHiStateAlmenab;
    }
    public void setMeter_titHiStateAlmenab(int meter_titHiStateAlmenab) {
        this.meter_titHiStateAlmenab = meter_titHiStateAlmenab;
    }
    public int getMeter_pitState() {
        return meter_pitState;
    }
    public void setMeter_pitState(int meter_pitState) {
        this.meter_pitState = meter_pitState;
    }
    public int getMeter_pitLoStateAlmenab() {
        return meter_pitLoStateAlmenab;
    }
    public void setMeter_pitLoStateAlmenab(int meter_pitLoStateAlmenab) {
        this.meter_pitLoStateAlmenab = meter_pitLoStateAlmenab;
    }
    public int getMeter_pitHiStateAlmenab() {
        return meter_pitHiStateAlmenab;
    }
    public void setMeter_pitHiStateAlmenab(int meter_pitHiStateAlmenab) {
        this.meter_pitHiStateAlmenab = meter_pitHiStateAlmenab;
    }
    public int getMeter_state() {
        return meter_state;
    }
    public void setMeter_state(int meter_state) {
        this.meter_state = meter_state;
    }
    public double getMeter_tit() {
        return meter_tit;
    }
    public void setMeter_tit(double meter_tit) {
        this.meter_tit = meter_tit;
    }
    public double getMeter_pit() {
        return meter_pit;
    }
    public void setMeter_pit(double meter_pit) {
        this.meter_pit = meter_pit;
    }

    public MeterMode(int meter_id, String meter_sn, String meter_signal, int meter_batteryState, double meter_voltage,
                     int meter_interval, double meter_titHi, double meter_titLo, double meter_pitHi, double meter_pitLo,
                     int meter_titHiEnabled, int meter_titLoEnabled, int meter_pitHiEnabled, int meter_pitLoEnabled,
                     Date meter_timeStamp, int meter_type, int meter_titState, int meter_titLoStateAlmenab,
                     int meter_titHiStateAlmenab, int meter_pitState, int meter_pitLoStateAlmenab, int meter_pitHiStateAlmenab,
                     int meter_state, double meter_tit, double meter_pit) {
        super();
        this.meter_id = meter_id;
        this.meter_sn = meter_sn;
        this.meter_signal = meter_signal;
        this.meter_batteryState = meter_batteryState;
        this.meter_voltage = meter_voltage;
        this.meter_interval = meter_interval;
        this.meter_titHi = meter_titHi;
        this.meter_titLo = meter_titLo;
        this.meter_pitHi = meter_pitHi;
        this.meter_pitLo = meter_pitLo;
        this.meter_titHiEnabled = meter_titHiEnabled;
        this.meter_titLoEnabled = meter_titLoEnabled;
        this.meter_pitHiEnabled = meter_pitHiEnabled;
        this.meter_pitLoEnabled = meter_pitLoEnabled;
        this.meter_timeStamp = meter_timeStamp;
        this.meter_type = meter_type;
        this.meter_titState = meter_titState;
        this.meter_titLoStateAlmenab = meter_titLoStateAlmenab;
        this.meter_titHiStateAlmenab = meter_titHiStateAlmenab;
        this.meter_pitState = meter_pitState;
        this.meter_pitLoStateAlmenab = meter_pitLoStateAlmenab;
        this.meter_pitHiStateAlmenab = meter_pitHiStateAlmenab;
        this.meter_state = meter_state;
        this.meter_tit = meter_tit;
        this.meter_pit = meter_pit;
    }


    public MeterMode(String meter_sn, Date meter_timeStamp, double meter_tit, double meter_pit) {
        super();
        this.meter_sn = meter_sn;
        this.meter_timeStamp = meter_timeStamp;
        this.meter_tit = meter_tit;
        this.meter_pit = meter_pit;
    }
    public MeterMode() {
        super();
    }
    @Override
    public String toString() {
        return "MeterMode [meter_id=" + meter_id + ", meter_sn=" + meter_sn + ", meter_signal=" + meter_signal
                + ", meter_batteryState=" + meter_batteryState + ", meter_voltage=" + meter_voltage
                + ", meter_interval=" + meter_interval + ", meter_titHi=" + meter_titHi + ", meter_titLo=" + meter_titLo
                + ", meter_pitHi=" + meter_pitHi + ", meter_pitLo=" + meter_pitLo + ", meter_titHiEnabled="
                + meter_titHiEnabled + ", meter_titLoEnabled=" + meter_titLoEnabled + ", meter_pitHiEnabled="
                + meter_pitHiEnabled + ", meter_pitLoEnabled=" + meter_pitLoEnabled + ", meter_timeStamp="
                + meter_timeStamp + ", meter_type=" + meter_type + ", meter_titState=" + meter_titState
                + ", meter_titLoStateAlmenab=" + meter_titLoStateAlmenab + ", meter_titHiStateAlmenab="
                + meter_titHiStateAlmenab + ", meter_pitState=" + meter_pitState + ", meter_pitLoStateAlmenab="
                + meter_pitLoStateAlmenab + ", meter_pitHiStateAlmenab=" + meter_pitHiStateAlmenab + ", meter_state="
                + meter_state + ", meter_tit=" + meter_tit + ", meter_pit=" + meter_pit + "]";
    }
}
